import { Component, OnInit } from '@angular/core';
import { HttpClient } from '@angular/common/http';
@Component({
  selector: 'app-store',
  templateUrl: './store.component.html',
  styleUrls: ['./store.component.scss']
})
export class StoreComponent implements OnInit {
  // 轮播数组
  public imgList: any[] = [];

  constructor(public http: HttpClient) { }

  ngOnInit() {
    // 请求远程轮播数据
    const url = 'http://192.168.2.228:8080/rotation/list';
    this.http.get(url).subscribe((Response: any) => {
      this.imgList = Response.data.list;
    });
  }
}
